<div class="content-box"><!-- Start Content Box -->
				
	<div class="content-box-header">
		
		<h3>Listado de Enlaces</h3>
				
		<div class="clear"></div>
		
	</div> <!-- End .content-box-header -->
	
	<div class="content-box-content">

		<table class="list">
			
			<thead>
				<tr>

<!--				   <th><input class="check-all" type="checkbox" /></th>-->
				   <th>Id</th>
				   <th>Nombre</th>
				   <th>Url</th>
				   <th>Categorias</th>
				   <th>Estado</th>
				   
				   <th>Acciones</th>

				</tr>
				
			</thead>
		 
			<tfoot>
				<tr>
					<td colspan="6">
						<?php echo $this->pagination->create_links(); ?>
						<div class="clear"></div>
						<div class="bulk-actions align-right">
						<?php echo anchor("admin/links/add", "Añadir Enlace", 'class="button"'); ?>
						</div>
						
						<div class="clear"></div>
					</td>
				</tr>
			</tfoot>
		 
			<tbody>
				<?php if ($elements): ?>
					<?php foreach($elements as $element): ?>
					<tr>
<!--						<td><input type="checkbox" /></td>-->
						<td><?php echo $element->link_id; ?></td>
		
						<td><?php echo anchor('admin/links/edit/' . $element->link_id, $element->link_name); ?></td>
						<td><?php echo $element->link_url; ?></td>
						
						<td>
							<?php if(isset($element->categories)):?>
								<?php foreach($element->categories as $cat):?>
								<div><?php echo anchor("admin/categories/edit/{$cat->id}", $cat->name); ?></div>
								<?php endforeach;?>
							<?php endif;?>
						</td>
						
						<td class="status"><span class="<?php echo $element->link_status; ?>"><?php echo $element->link_status; ?></span></td>
						<td>
							<!-- Icons -->
							 <?php echo anchor('admin/links/edit/' . $element->link_id, '<img src="' . static_url("images/icons/pencil.png") . '" title="Editar Enlace" border="0">'); ?>
							 <?php echo anchor('admin/links/delete/' . $element->link_id, '<img src="' . static_url("images/icons/cross.png") . '" title="Eliminar Enlace" border="0">', array ('onClick' => "return confirm('¿Desea eliminar el enlace?')")); ?>
							 
						</td>
					</tr>
					<?php endforeach;?>
				<?php else: ?>
				<tr>
					<td colspan="6">No existen enlaces</td>
				</tr>
				<?php endif; ?>
			
			</tbody>
			
		</table>

		

	</div>
	
</div>
